/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package syntaxanalyser;

import java.util.ArrayList;

/**
 *
 * @author mark_o
 */
public class PostfiksXY extends Postfiks{
    public void set_var(double x,double y)
        {
            ArrayList v = new ArrayList();
            v.add(x);
            v.add(y);
            super.set_var(v);
        }
        public double Valuete(double x,double y) throws Exception
        {
            set_var(x,y);
            return super.Valuete();
        }
        public static double Calculate(String func, double x,double y) throws Exception
        {
            PostfiksXY p = new PostfiksXY();
            p.input(func);
            p.set_var(x,y);
            return p.Valuete();
        }

}
